package com.wuyou.designPatterns.visiotor;

/**
 * @Description
 * @Author 无忧
 * @Date 2024/10/11 21:17
 */
public class File extends Entry{

    private String name;
    private int size;

    public File(String name, int size){
        this.name = name;
        this.size = size;
    }

    @Override
    public String getName() {
        return this.name;
    }

    @Override
    public int getSize() {
        return this.size;
    }

    public void accept(Visitor visitor){
        visitor.visit(this);
    }
}
